package com.fcscs.cservice.ws.endpoint;

import org.springframework.ws.server.endpoint.annotation.Endpoint;
import org.springframework.ws.server.endpoint.annotation.PayloadRoot;
import org.springframework.ws.server.endpoint.annotation.RequestPayload;
import org.springframework.ws.server.endpoint.annotation.ResponsePayload;

import com.fcscs.cservice.ws.schema.pmsservice.AuditCutOffRequest;
import com.fcscs.cservice.ws.schema.pmsservice.AuditCutOffResponse;
import com.fcscs.cservice.ws.schema.pmsservice.AutoWakeupRequest;
import com.fcscs.cservice.ws.schema.pmsservice.AutoWakeupResponse;
import com.fcscs.cservice.ws.schema.pmsservice.CheckInRequest;
import com.fcscs.cservice.ws.schema.pmsservice.CheckInResponse;
import com.fcscs.cservice.ws.schema.pmsservice.CheckOutRequest;
import com.fcscs.cservice.ws.schema.pmsservice.CheckOutResponse;
import com.fcscs.cservice.ws.schema.pmsservice.DatabaseSwapRequest;
import com.fcscs.cservice.ws.schema.pmsservice.DatabaseSwapResponse;
import com.fcscs.cservice.ws.schema.pmsservice.DoNotDisturbRequest;
import com.fcscs.cservice.ws.schema.pmsservice.DoNotDisturbResponse;
import com.fcscs.cservice.ws.schema.pmsservice.ExpressCOResultRequest;
import com.fcscs.cservice.ws.schema.pmsservice.ExpressCOResultResponse;
import com.fcscs.cservice.ws.schema.pmsservice.FolioDetailRequest;
import com.fcscs.cservice.ws.schema.pmsservice.FolioDetailResponse;
import com.fcscs.cservice.ws.schema.pmsservice.GuestTextMessageRequest;
import com.fcscs.cservice.ws.schema.pmsservice.GuestTextMessageResponse;
import com.fcscs.cservice.ws.schema.pmsservice.HouseKeepingRequest;
import com.fcscs.cservice.ws.schema.pmsservice.HouseKeepingResponse;
import com.fcscs.cservice.ws.schema.pmsservice.InterfaceStatusRequest;
import com.fcscs.cservice.ws.schema.pmsservice.InterfaceStatusResponse;
import com.fcscs.cservice.ws.schema.pmsservice.MessageLampRequest;
import com.fcscs.cservice.ws.schema.pmsservice.MessageLampResponse;
import com.fcscs.cservice.ws.schema.pmsservice.ResultStatus;
import com.fcscs.cservice.ws.schema.pmsservice.ResultStatusFlag;
import com.fcscs.cservice.ws.schema.pmsservice.RoomChangeRequest;
import com.fcscs.cservice.ws.schema.pmsservice.RoomChangeResponse;

@Endpoint
public class PmsServiceEndpoint {
	
	private ResultStatus result;

	public PmsServiceEndpoint() {
		result = new ResultStatus();
		ResultStatusFlag resultStatusFlag = ResultStatusFlag.SUCCESS;
		result.setResultStatusFlag(resultStatusFlag);
	}


	@PayloadRoot(localPart = "CheckInRequest", namespace = "http://fcscs.com/cservice/ws/schema/pmsservice")
	@ResponsePayload
	public CheckInResponse checkIn(@RequestPayload CheckInRequest req) {
		
		CheckInResponse resp = new CheckInResponse();
		
		result.setDeviceId(req.getDeviceId());
		resp.setResultStatus(result);

		return resp;
	}
	
	
	@PayloadRoot(localPart = "CheckOutRequest", namespace = "http://fcscs.com/cservice/ws/schema/pmsservice")
	@ResponsePayload
	public CheckOutResponse checkOut(@RequestPayload CheckOutRequest req) {
		
		CheckOutResponse resp = new CheckOutResponse();
		
		result.setDeviceId(req.getDeviceId());
		resp.setResultStatus(result);

		return resp;
	}
	
	@PayloadRoot(localPart = "RoomChangeRequest", namespace = "http://fcscs.com/cservice/ws/schema/pmsservice")
	@ResponsePayload
	public RoomChangeResponse roomChange(@RequestPayload RoomChangeRequest req) {
		
		RoomChangeResponse resp = new RoomChangeResponse();
		
		result.setDeviceId(req.getDeviceId());
		resp.setResultStatus(result);

		return resp;
	}
	
	@PayloadRoot(localPart = "MessageLampRequest", namespace = "http://fcscs.com/cservice/ws/schema/pmsservice")
	@ResponsePayload
	public MessageLampResponse messageLamp(@RequestPayload MessageLampRequest req) {
		
		MessageLampResponse resp = new MessageLampResponse();
		
		result.setDeviceId(req.getDeviceId());
		resp.setResultStatus(result);

		return resp;
	}
	
	
	@PayloadRoot(localPart = "AutoWakeupRequest", namespace = "http://fcscs.com/cservice/ws/schema/pmsservice")
	@ResponsePayload
	public AutoWakeupResponse autoWakeup(@RequestPayload AutoWakeupRequest req) {
		
		AutoWakeupResponse resp = new AutoWakeupResponse();
		
		result.setDeviceId(req.getDeviceId());
		resp.setResultStatus(result);

		return resp;
	}
	
	
	@PayloadRoot(localPart = "DoNotDisturbRequest", namespace = "http://fcscs.com/cservice/ws/schema/pmsservice")
	@ResponsePayload
	public DoNotDisturbResponse doNotDisturb(@RequestPayload DoNotDisturbRequest req) {
		
		DoNotDisturbResponse resp = new DoNotDisturbResponse();
		
		result.setDeviceId(req.getDeviceId());
		resp.setResultStatus(result);

		return resp;
	}
	
	
	@PayloadRoot(localPart = "GuestTextMessageRequest", namespace = "http://fcscs.com/cservice/ws/schema/pmsservice")
	@ResponsePayload
	public GuestTextMessageResponse guestTextMessage(@RequestPayload GuestTextMessageRequest req) {
		
		GuestTextMessageResponse resp = new GuestTextMessageResponse();
		
		result.setDeviceId(req.getDeviceId());
		resp.setResultStatus(result);

		return resp;
	}
	
	
	@PayloadRoot(localPart = "AuditCutOffRequest", namespace = "http://fcscs.com/cservice/ws/schema/pmsservice")
	@ResponsePayload
	public AuditCutOffResponse auditCutOff(@RequestPayload AuditCutOffRequest req) {
		
		AuditCutOffResponse resp = new AuditCutOffResponse();
		
		result.setDeviceId(req.getDeviceId());
		resp.setResultStatus(result);

		return resp;
	}
	
	
	@PayloadRoot(localPart = "DatabaseSwapRequest", namespace = "http://fcscs.com/cservice/ws/schema/pmsservice")
	@ResponsePayload
	public DatabaseSwapResponse databaseSwap(@RequestPayload DatabaseSwapRequest req) {
		
		DatabaseSwapResponse resp = new DatabaseSwapResponse();
		
		result.setDeviceId(req.getDeviceId());
		resp.setResultStatus(result);

		return resp;
	}
	
	
	@PayloadRoot(localPart = "HouseKeepingRequest", namespace = "http://fcscs.com/cservice/ws/schema/pmsservice")
	@ResponsePayload
	public HouseKeepingResponse houseKeeping(@RequestPayload HouseKeepingRequest req) {
		
		HouseKeepingResponse resp = new HouseKeepingResponse();
		
		result.setDeviceId(req.getDeviceId());
		resp.setResultStatus(result);

		return resp;
	}
	
	
	
	@PayloadRoot(localPart = "FolioDetailRequest", namespace = "http://fcscs.com/cservice/ws/schema/pmsservice")
	@ResponsePayload
	public FolioDetailResponse folioDetail(@RequestPayload FolioDetailRequest req) {
		
		FolioDetailResponse resp = new FolioDetailResponse();
		
		result.setDeviceId(req.getDeviceId());
		resp.setResultStatus(result);

		return resp;
	}
	
	
	@PayloadRoot(localPart = "ExpressCOResultRequest", namespace = "http://fcscs.com/cservice/ws/schema/pmsservice")
	@ResponsePayload
	public ExpressCOResultResponse expressCOResult(@RequestPayload ExpressCOResultRequest req) {
		
		ExpressCOResultResponse resp = new ExpressCOResultResponse();
		
		result.setDeviceId(req.getDeviceId());
		resp.setResultStatus(result);

		return resp;
	}
	
	
	
	@PayloadRoot(localPart = "InterfaceStatusRequest", namespace = "http://fcscs.com/cservice/ws/schema/pmsservice")
	@ResponsePayload
	public InterfaceStatusResponse interfaceStatus(@RequestPayload InterfaceStatusRequest req) {
		
		InterfaceStatusResponse resp = new InterfaceStatusResponse();
		
		result.setDeviceId(req.getDeviceId());
		resp.setResultStatus(result);

		return resp;
	}
	
	
	
	
}
